#ifndef __LIB_AGORA_ADMIN_USERMANAGER_H__
#define __LIB_AGORA_ADMIN_USERMANAGER_H__

#include "AdminIUserManager.h"

namespace AgoraAdmin
{

	class	UserManager : public IUserManager
	{
	public:
		static IUserManager*				GetUserManager(void);
		std::map<unsigned int, IUser*>*		GetUser();
		IUser*								GetUser(unsigned int id);
		IUser*								GetUser(std::string& login);
		void								LoadUser(void);
		IUser*								LoadUser(const unsigned int id);
		IUser*								LoadUser(const std::string& login);
		void								UnloadUser(void);
		void								UnloadUser(const unsigned int id);
		IUser*								CreateUser(const std::string& login, const std::string& password);
		void								DeleteUser(void);
		void								DeleteUser(const unsigned int id);
		bool								UserExists(const std::string& login);

	private:
		UserManager();
		static IUserManager*				_instance;
		std::map<unsigned int, IUser*>		_user;
	};

}

#endif